home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / genial / ui / main_control_ui.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  24.4 KB  |  1,129 lines

  1. /*
  2.  * main_control_ui.c - User interface object initialization functions.
  3.  * This file was generated by `gxv' from `main_control.G'.
  4.  * DO NOT EDIT BY HAND.
  5.  */
  6.  
  7. #include <stdio.h>
  8. #include <sys/param.h>
  9. #include <sys/types.h>
  10. #include <xview/xview.h>
  11. #include <xview/canvas.h>
  12. #include <xview/panel.h>
  13. #include <xview/scrollbar.h>
  14. #include <xview/svrimage.h>
  15. #include <xview/termsw.h>
  16. #include <xview/text.h>
  17. #include <xview/tty.h>
  18. #include <xview/xv_xrect.h>
  19. #include "main_control_ui.h"
  20.  
  21. /*
  22.  * Initialize an instance of object `ctrlwin'.
  23.  */
  24. main_control_ctrlwin_objects *
  25. main_control_ctrlwin_objects_initialize(ip, owner)
  26.     main_control_ctrlwin_objects    *ip;
  27.     Xv_opaque    owner;
  28. {
  29.     if (!ip && !(ip = (main_control_ctrlwin_objects *) calloc(1, sizeof (main_control_ctrlwin_objects))))
  30.         return (main_control_ctrlwin_objects *) NULL;
  31.     if (!ip->ctrlwin)
  32.         ip->ctrlwin = main_control_ctrlwin_ctrlwin_create(ip, owner);
  33.     if (!ip->controls1)
  34.         ip->controls1 = main_control_ctrlwin_controls1_create(ip, ip->ctrlwin);
  35.     if (!ip->message1)
  36.         ip->message1 = main_control_ctrlwin_message1_create(ip, ip->controls1);
  37.     if (!ip->image_fname)
  38.         ip->image_fname = main_control_ctrlwin_image_fname_create(ip, ip->controls1);
  39.     if (!ip->file)
  40.         ip->file = main_control_ctrlwin_file_create(ip, ip->controls1);
  41.     if (!ip->quit)
  42.         ip->quit = main_control_ctrlwin_quit_create(ip, ip->controls1);
  43.     if (!ip->prev)
  44.         ip->prev = main_control_ctrlwin_prev_create(ip, ip->controls1);
  45.     if (!ip->next)
  46.         ip->next = main_control_ctrlwin_next_create(ip, ip->controls1);
  47.     if (!ip->frame_stat)
  48.         ip->frame_stat = main_control_ctrlwin_frame_stat_create(ip, ip->controls1);
  49.     if (!ip->func_sel)
  50.         ip->func_sel = main_control_ctrlwin_func_sel_create(ip, ip->controls1);
  51.     if (!ip->reg_type)
  52.         ip->reg_type = main_control_ctrlwin_reg_type_create(ip, ip->controls1);
  53.     if (!ip->message2)
  54.         ip->message2 = main_control_ctrlwin_message2_create(ip, ip->controls1);
  55.     if (!ip->log_num)
  56.         ip->log_num = main_control_ctrlwin_log_num_create(ip, ip->controls1);
  57.     if (!ip->eval)
  58.         ip->eval = main_control_ctrlwin_eval_create(ip, ip->controls1);
  59.     if (!ip->refresh)
  60.         ip->refresh = main_control_ctrlwin_refresh_create(ip, ip->controls1);
  61.     if (!ip->clear)
  62.         ip->clear = main_control_ctrlwin_clear_create(ip, ip->controls1);
  63.     if (!ip->clear_all)
  64.         ip->clear_all = main_control_ctrlwin_clear_all_create(ip, ip->controls1);
  65.     if (!ip->display)
  66.         ip->display = main_control_ctrlwin_display_create(ip, ip->controls1);
  67.     if (!ip->setting1)
  68.         ip->setting1 = main_control_ctrlwin_setting1_create(ip, ip->controls1);
  69.     if (!ip->lmode)
  70.         ip->lmode = main_control_ctrlwin_lmode_create(ip, ip->controls1);
  71.     if (!ip->controls2)
  72.         ip->controls2 = main_control_ctrlwin_controls2_create(ip, ip->ctrlwin);
  73.     if (!ip->statmsg1)
  74.         ip->statmsg1 = main_control_ctrlwin_statmsg1_create(ip, ip->controls2);
  75.     if (!ip->statmsg2)
  76.         ip->statmsg2 = main_control_ctrlwin_statmsg2_create(ip, ip->controls2);
  77.     if (!ip->statmsg3)
  78.         ip->statmsg3 = main_control_ctrlwin_statmsg3_create(ip, ip->controls2);
  79.     if (!ip->statmsg4)
  80.         ip->statmsg4 = main_control_ctrlwin_statmsg4_create(ip, ip->controls2);
  81.     if (!ip->controls3)
  82.         ip->controls3 = main_control_ctrlwin_controls3_create(ip, ip->ctrlwin);
  83.     if (!ip->edit_mode)
  84.         ip->edit_mode = main_control_ctrlwin_edit_mode_create(ip, ip->controls3);
  85.     if (!ip->edit_ok)
  86.         ip->edit_ok = main_control_ctrlwin_edit_ok_create(ip, ip->controls3);
  87.     if (!ip->message7)
  88.         ip->message7 = main_control_ctrlwin_message7_create(ip, ip->controls3);
  89.     if (!ip->edit_log_num)
  90.         ip->edit_log_num = main_control_ctrlwin_edit_log_num_create(ip, ip->controls3);
  91.     if (!ip->button1)
  92.         ip->button1 = main_control_ctrlwin_button1_create(ip, ip->controls3);
  93.     if (!ip->message9)
  94.         ip->message9 = main_control_ctrlwin_message9_create(ip, ip->controls3);
  95.     if (!ip->controls4)
  96.         ip->controls4 = main_control_ctrlwin_controls4_create(ip, ip->ctrlwin);
  97.     if (!ip->infomesg)
  98.         ip->infomesg = main_control_ctrlwin_infomesg_create(ip, ip->controls4);
  99.     if (!ip->message3)
  100.         ip->message3 = main_control_ctrlwin_message3_create(ip, ip->controls4);
  101.     if (!ip->xlabel)
  102.         ip->xlabel = main_control_ctrlwin_xlabel_create(ip, ip->controls4);
  103.     if (!ip->message4)
  104.         ip->message4 = main_control_ctrlwin_message4_create(ip, ip->controls4);
  105.     if (!ip->ylabel)
  106.         ip->ylabel = main_control_ctrlwin_ylabel_create(ip, ip->controls4);
  107.     if (!ip->message5)
  108.         ip->message5 = main_control_ctrlwin_message5_create(ip, ip->controls4);
  109.     if (!ip->glabel)
  110.         ip->glabel = main_control_ctrlwin_glabel_create(ip, ip->controls4);
  111.     if (!ip->imglabel)
  112.         ip->imglabel = main_control_ctrlwin_imglabel_create(ip, ip->controls4);
  113.     return ip;
  114. }
  115.  
  116. /*
  117.  * Create object `ctrlwin' in the specified instance.
  118.  */
  119. Xv_opaque
  120. main_control_ctrlwin_ctrlwin_create(ip, owner)
  121.     main_control_ctrlwin_objects    *ip;
  122.     Xv_opaque    owner;
  123. {
  124.     Xv_opaque    obj;
  125.     Xv_opaque        ctrlwin_image;
  126.     static unsigned short    ctrlwin_bits[] = {
  127. #include "genial.icon"
  128.     };
  129.     
  130.     ctrlwin_image = xv_create(XV_NULL, SERVER_IMAGE,
  131.         SERVER_IMAGE_DEPTH, 1,
  132.         SERVER_IMAGE_BITS, ctrlwin_bits,
  133.         XV_WIDTH, 64,
  134.         XV_HEIGHT, 64,
  135.         NULL);
  136.     obj = xv_create(owner, FRAME,
  137.         XV_KEY_DATA, INSTANCE, ip,
  138.         XV_WIDTH, 335,
  139.         XV_HEIGHT, 453,
  140.         XV_LABEL, "GENIAL Control (version 1.2)",
  141.         FRAME_SHOW_FOOTER, FALSE,
  142.         FRAME_SHOW_RESIZE_CORNER, FALSE,
  143.         FRAME_ICON, xv_create(XV_NULL, ICON,
  144.             ICON_IMAGE, ctrlwin_image,
  145.             NULL),
  146.         NULL);
  147.     return obj;
  148. }
  149.  
  150. /*
  151.  * Create object `controls1' in the specified instance.
  152.  */
  153. Xv_opaque
  154. main_control_ctrlwin_controls1_create(ip, owner)
  155.     main_control_ctrlwin_objects    *ip;
  156.     Xv_opaque    owner;
  157. {
  158.     Xv_opaque    obj;
  159.     
  160.     obj = xv_create(owner, PANEL,
  161.         XV_KEY_DATA, INSTANCE, ip,
  162.         XV_X, 0,
  163.         XV_Y, 0,
  164.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  165.         XV_HEIGHT, 255,
  166.         WIN_BORDER, TRUE,
  167.         NULL);
  168.     return obj;
  169. }
  170.  
  171. /*
  172.  * Create object `message1' in the specified instance.
  173.  */
  174. Xv_opaque
  175. main_control_ctrlwin_message1_create(ip, owner)
  176.     main_control_ctrlwin_objects    *ip;
  177.     Xv_opaque    owner;
  178. {
  179.     Xv_opaque    obj;
  180.     
  181.     obj = xv_create(owner, PANEL_MESSAGE,
  182.         XV_KEY_DATA, INSTANCE, ip,
  183.         XV_X, 8,
  184.         XV_Y, 8,
  185.         PANEL_LABEL_STRING, "Image:",
  186.         PANEL_LABEL_BOLD, TRUE,
  187.         NULL);
  188.     return obj;
  189. }
  190.  
  191. /*
  192.  * Create object `image_fname' in the specified instance.
  193.  */
  194. Xv_opaque
  195. main_control_ctrlwin_image_fname_create(ip, owner)
  196.     main_control_ctrlwin_objects    *ip;
  197.     Xv_opaque    owner;
  198. {
  199.     Xv_opaque    obj;
  200.     
  201.     obj = xv_create(owner, PANEL_MESSAGE,
  202.         XV_KEY_DATA, INSTANCE, ip,
  203.         XV_HELP_DATA, "main_control:image_fname",
  204.         XV_X, 72,
  205.         XV_Y, 8,
  206.         PANEL_LABEL_STRING, "file name",
  207.         PANEL_LABEL_BOLD, FALSE,
  208.         NULL);
  209.     return obj;
  210. }
  211.  
  212. /*
  213.  * Create object `file' in the specified instance.
  214.  */
  215. Xv_opaque
  216. main_control_ctrlwin_file_create(ip, owner)
  217.     main_control_ctrlwin_objects    *ip;
  218.     Xv_opaque    owner;
  219. {
  220.     extern void        file_proc();
  221.     Xv_opaque    obj;
  222.     
  223.     obj = xv_create(owner, PANEL_BUTTON,
  224.         XV_KEY_DATA, INSTANCE, ip,
  225.         XV_HELP_DATA, "main_control:file",
  226.         XV_X, 192,
  227.         XV_Y, 8,
  228.         PANEL_LABEL_STRING, "Load/Save...",
  229.         PANEL_NOTIFY_PROC, file_proc,
  230.         NULL);
  231.     return obj;
  232. }
  233.  
  234. /*
  235.  * Create object `quit' in the specified instance.
  236.  */
  237. Xv_opaque
  238. main_control_ctrlwin_quit_create(ip, owner)
  239.     main_control_ctrlwin_objects    *ip;
  240.     Xv_opaque    owner;
  241. {
  242.     extern void        quit_proc();
  243.     Xv_opaque    obj;
  244.     
  245.     obj = xv_create(owner, PANEL_BUTTON,
  246.         XV_KEY_DATA, INSTANCE, ip,
  247.         XV_HELP_DATA, "main_control:quit",
  248.         XV_X, 284,
  249.         XV_Y, 8,
  250.         PANEL_LABEL_STRING, "Quit",
  251.         PANEL_NOTIFY_PROC, quit_proc,
  252.         NULL);
  253.     return obj;
  254. }
  255.  
  256. /*
  257.  * Create object `prev' in the specified instance.
  258.  */
  259. Xv_opaque
  260. main_control_ctrlwin_prev_create(ip, owner)
  261.     main_control_ctrlwin_objects    *ip;
  262.     Xv_opaque    owner;
  263. {
  264.     extern void        prev_proc();
  265.     Xv_opaque    obj;
  266.     
  267.     obj = xv_create(owner, PANEL_BUTTON,
  268.         XV_KEY_DATA, INSTANCE, ip,
  269.         XV_HELP_DATA, "main_control:prev",
  270.         XV_X, 228,
  271.         XV_Y, 32,
  272.         PANEL_LABEL_STRING, "<",
  273.         PANEL_NOTIFY_PROC, prev_proc,
  274.         NULL);
  275.     return obj;
  276. }
  277.  
  278. /*
  279.  * Create object `next' in the specified instance.
  280.  */
  281. Xv_opaque
  282. main_control_ctrlwin_next_create(ip, owner)
  283.     main_control_ctrlwin_objects    *ip;
  284.     Xv_opaque    owner;
  285. {
  286.     extern void        next_proc();
  287.     Xv_opaque    obj;
  288.     
  289.     obj = xv_create(owner, PANEL_BUTTON,
  290.         XV_KEY_DATA, INSTANCE, ip,
  291.         XV_HELP_DATA, "main_control:next",
  292.         XV_X, 258,
  293.         XV_Y, 32,
  294.         PANEL_LABEL_STRING, ">",
  295.         PANEL_NOTIFY_PROC, next_proc,
  296.         NULL);
  297.     return obj;
  298. }
  299.  
  300. /*
  301.  * Create object `frame_stat' in the specified instance.
  302.  */
  303. Xv_opaque
  304. main_control_ctrlwin_frame_stat_create(ip, owner)
  305.     main_control_ctrlwin_objects    *ip;
  306.     Xv_opaque    owner;
  307. {
  308.     Xv_opaque    obj;
  309.     
  310.     obj = xv_create(owner, PANEL_MESSAGE,
  311.         XV_KEY_DATA, INSTANCE, ip,
  312.         XV_HELP_DATA, "main_control:frame_stat",
  313.         XV_X, 292,
  314.         XV_Y, 35,
  315.         PANEL_LABEL_STRING, "0/0",
  316.         PANEL_LABEL_BOLD, TRUE,
  317.         NULL);
  318.     return obj;
  319. }
  320.  
  321. /*
  322.  * Create object `func_sel' in the specified instance.
  323.  */
  324. Xv_opaque
  325. main_control_ctrlwin_func_sel_create(ip, owner)
  326.     main_control_ctrlwin_objects    *ip;
  327.     Xv_opaque    owner;
  328. {
  329.     extern void        func_sel_proc();
  330.     Xv_opaque    obj;
  331.     
  332.     obj = xv_create(owner, PANEL_CHOICE,
  333.         XV_KEY_DATA, INSTANCE, ip,
  334.         XV_HELP_DATA, "main_control:func_sel",
  335.         XV_X, 8,
  336.         XV_Y, 40,
  337.         PANEL_CHOICE_NCOLS, 1,
  338.         PANEL_LAYOUT, PANEL_VERTICAL,
  339.         PANEL_CHOOSE_NONE, FALSE,
  340.         PANEL_LABEL_STRING, "Function:",
  341.         PANEL_NOTIFY_PROC, func_sel_proc,
  342.         PANEL_CHOICE_STRINGS,
  343.             "Trace",
  344.             "Histogram",
  345.             "Zoom",
  346.             "Distance",
  347.             "Angle Measure",
  348.             "Annotate",
  349.             "Comment File",
  350.             NULL,
  351.         NULL);
  352.     return obj;
  353. }
  354.  
  355. /*
  356.  * Create object `reg_type' in the specified instance.
  357.  */
  358. Xv_opaque
  359. main_control_ctrlwin_reg_type_create(ip, owner)
  360.     main_control_ctrlwin_objects    *ip;
  361.     Xv_opaque    owner;
  362. {
  363.     extern void        reg_type_proc();
  364.     Xv_opaque    obj;
  365.     
  366.     obj = xv_create(owner, PANEL_CHOICE,
  367.         XV_KEY_DATA, INSTANCE, ip,
  368.         XV_HELP_DATA, "main_control:reg_type",
  369.         XV_X, 128,
  370.         XV_Y, 40,
  371.         PANEL_CHOICE_NCOLS, 1,
  372.         PANEL_LAYOUT, PANEL_VERTICAL,
  373.         PANEL_CHOOSE_NONE, FALSE,
  374.         PANEL_LABEL_STRING, "Mode:",
  375.         PANEL_NOTIFY_PROC, reg_type_proc,
  376.         PANEL_CHOICE_STRINGS,
  377.             "Line",
  378.             "Spline",
  379.             "C-Spline",
  380.             "Polygon",
  381.             "Box",
  382.             "Text",
  383.             "Arrow",
  384.             NULL,
  385.         NULL);
  386.     return obj;
  387. }
  388.  
  389. /*
  390.  * Create object `message2' in the specified instance.
  391.  */
  392. Xv_opaque
  393. main_control_ctrlwin_message2_create(ip, owner)
  394.     main_control_ctrlwin_objects    *ip;
  395.     Xv_opaque    owner;
  396. {
  397.     Xv_opaque    obj;
  398.     
  399.     obj = xv_create(owner, PANEL_MESSAGE,
  400.         XV_KEY_DATA, INSTANCE, ip,
  401.         XV_X, 224,
  402.         XV_Y, 60,
  403.         PANEL_LABEL_STRING, "Curr Log #:",
  404.         PANEL_LABEL_BOLD, TRUE,
  405.         NULL);
  406.     return obj;
  407. }
  408.  
  409. /*
  410.  * Create object `log_num' in the specified instance.
  411.  */
  412. Xv_opaque
  413. main_control_ctrlwin_log_num_create(ip, owner)
  414.     main_control_ctrlwin_objects    *ip;
  415.     Xv_opaque    owner;
  416. {
  417.     Xv_opaque    obj;
  418.     
  419.     obj = xv_create(owner, PANEL_MESSAGE,
  420.         XV_KEY_DATA, INSTANCE, ip,
  421.         XV_HELP_DATA, "main_control:log_num",
  422.         XV_X, 308,
  423.         XV_Y, 60,
  424.         PANEL_LABEL_STRING, "00",
  425.         PANEL_LABEL_BOLD, FALSE,
  426.         NULL);
  427.     return obj;
  428. }
  429.  
  430. /*
  431.  * Create object `eval' in the specified instance.
  432.  */
  433. Xv_opaque
  434. main_control_ctrlwin_eval_create(ip, owner)
  435.     main_control_ctrlwin_objects    *ip;
  436.     Xv_opaque    owner;
  437. {
  438.     extern void        eval_proc();
  439.     Xv_opaque    obj;
  440.     
  441.     obj = xv_create(owner, PANEL_BUTTON,
  442.         XV_KEY_DATA, INSTANCE, ip,
  443.         XV_HELP_DATA, "main_control:eval",
  444.         XV_X, 216,
  445.         XV_Y, 80,
  446.         PANEL_LABEL_STRING, "Eval",
  447.         PANEL_NOTIFY_PROC, eval_proc,
  448.         NULL);
  449.     return obj;
  450. }
  451.  
  452. /*
  453.  * Create object `refresh' in the specified instance.
  454.  */
  455. Xv_opaque
  456. main_control_ctrlwin_refresh_create(ip, owner)
  457.     main_control_ctrlwin_objects    *ip;
  458.     Xv_opaque    owner;
  459. {
  460.     extern void        refresh_proc();
  461.     Xv_opaque    obj;
  462.     
  463.     obj = xv_create(owner, PANEL_BUTTON,
  464.         XV_KEY_DATA, INSTANCE, ip,
  465.         XV_HELP_DATA, "main_control:refresh",
  466.         XV_X, 264,
  467.         XV_Y, 80,
  468.         PANEL_LABEL_STRING, "Refresh",
  469.         PANEL_NOTIFY_PROC, refresh_proc,
  470.         NULL);
  471.     return obj;
  472. }
  473.  
  474. /*
  475.  * Create object `clear' in the specified instance.
  476.  */
  477. Xv_opaque
  478. main_control_ctrlwin_clear_create(ip, owner)
  479.     main_control_ctrlwin_objects    *ip;
  480.     Xv_opaque    owner;
  481. {
  482.     extern void        clear_proc();
  483.     Xv_opaque    obj;
  484.     
  485.     obj = xv_create(owner, PANEL_BUTTON,
  486.         XV_KEY_DATA, INSTANCE, ip,
  487.         XV_HELP_DATA, "main_control:clear",
  488.         XV_X, 216,
  489.         XV_Y, 109,
  490.         PANEL_LABEL_STRING, "Clear Last",
  491.         PANEL_NOTIFY_PROC, clear_proc,
  492.         NULL);
  493.     return obj;
  494. }
  495.  
  496. /*
  497.  * Create object `clear_all' in the specified instance.
  498.  */
  499. Xv_opaque
  500. main_control_ctrlwin_clear_all_create(ip, owner)
  501.     main_control_ctrlwin_objects    *ip;
  502.     Xv_opaque    owner;
  503. {
  504.     extern void        clear_all_proc();
  505.     Xv_opaque    obj;
  506.     
  507.     obj = xv_create(owner, PANEL_BUTTON,
  508.         XV_KEY_DATA, INSTANCE, ip,
  509.         XV_HELP_DATA, "main_control:clear_all",
  510.         XV_X, 216,
  511.         XV_Y, 138,
  512.         PANEL_LABEL_STRING, "Clear All",
  513.         PANEL_NOTIFY_PROC, clear_all_proc,
  514.         NULL);
  515.     return obj;
  516. }
  517.  
  518. /*
  519.  * Create object `display' in the specified instance.
  520.  */
  521. Xv_opaque
  522. main_control_ctrlwin_display_create(ip, owner)
  523.     main_control_ctrlwin_objects    *ip;
  524.     Xv_opaque    owner;
  525. {
  526.     extern void        dpyopt_proc();
  527.     Xv_opaque    obj;
  528.     
  529.     obj = xv_create(owner, PANEL_BUTTON,
  530.         XV_KEY_DATA, INSTANCE, ip,
  531.         XV_HELP_DATA, "main_control:display",
  532.         XV_X, 216,
  533.         XV_Y, 167,
  534.         PANEL_LABEL_STRING, "Display Opts...",
  535.         PANEL_NOTIFY_PROC, dpyopt_proc,
  536.         NULL);
  537.     return obj;
  538. }
  539.  
  540. /*
  541.  * Create object `setting1' in the specified instance.
  542.  */
  543. Xv_opaque
  544. main_control_ctrlwin_setting1_create(ip, owner)
  545.     main_control_ctrlwin_objects    *ip;
  546.     Xv_opaque    owner;
  547. {
  548.     extern void        set_clean_mode();
  549.     Xv_opaque    obj;
  550.     
  551.     obj = xv_create(owner, PANEL_TOGGLE, PANEL_FEEDBACK, PANEL_MARKED,
  552.         XV_KEY_DATA, INSTANCE, ip,
  553.         XV_X, 216,
  554.         XV_Y, 196,
  555.         PANEL_CHOICE_NCOLS, 1,
  556.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  557.         PANEL_LABEL_STRING, "Clean:",
  558.         PANEL_NOTIFY_PROC, set_clean_mode,
  559.         NULL);
  560.     return obj;
  561. }
  562.  
  563. /*
  564.  * Create object `lmode' in the specified instance.
  565.  */
  566. Xv_opaque
  567. main_control_ctrlwin_lmode_create(ip, owner)
  568.     main_control_ctrlwin_objects    *ip;
  569.     Xv_opaque    owner;
  570. {
  571.     extern void        linemode_proc();
  572.     Xv_opaque    obj;
  573.     
  574.     obj = xv_create(owner, PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT,
  575.         XV_KEY_DATA, INSTANCE, ip,
  576.         XV_HELP_DATA, "main_control:lmode",
  577.         XV_X, 8,
  578.         XV_Y, 223,
  579.         PANEL_CHOICE_NROWS, 1,
  580.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  581.         PANEL_LABEL_STRING, "Line Drawing Mode:",
  582.         PANEL_NOTIFY_PROC, linemode_proc,
  583.         PANEL_CHOICE_STRINGS,
  584.             "Click and Click",
  585.             "Click and Drag",
  586.             "Least Squares Fit",
  587.             NULL,
  588.         NULL);
  589.     return obj;
  590. }
  591.  
  592. /*
  593.  * Create object `controls2' in the specified instance.
  594.  */
  595. Xv_opaque
  596. main_control_ctrlwin_controls2_create(ip, owner)
  597.     main_control_ctrlwin_objects    *ip;
  598.     Xv_opaque    owner;
  599. {
  600.     Xv_opaque    obj;
  601.     
  602.     obj = xv_create(owner, PANEL,
  603.         XV_KEY_DATA, INSTANCE, ip,
  604.         XV_X, 0,
  605.         XV_Y, (int)xv_get(ip->controls1, XV_Y) +
  606.               (int)xv_get(ip->controls1, XV_HEIGHT) + 2,
  607.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  608.         XV_HEIGHT, 73,
  609.         WIN_BORDER, TRUE,
  610.         NULL);
  611.     return obj;
  612. }
  613.  
  614. /*
  615.  * Create object `statmsg1' in the specified instance.
  616.  */
  617. Xv_opaque
  618. main_control_ctrlwin_statmsg1_create(ip, owner)
  619.     main_control_ctrlwin_objects    *ip;
  620.     Xv_opaque    owner;
  621. {
  622.     Xv_opaque    obj;
  623.     
  624.     obj = xv_create(owner, PANEL_MESSAGE,
  625.         XV_KEY_DATA, INSTANCE, ip,
  626.         XV_X, 8,
  627.         XV_Y, 4,
  628.         PANEL_LABEL_STRING, "1",
  629.         PANEL_LABEL_BOLD, FALSE,
  630.         NULL);
  631.     return obj;
  632. }
  633.  
  634. /*
  635.  * Create object `statmsg2' in the specified instance.
  636.  */
  637. Xv_opaque
  638. main_control_ctrlwin_statmsg2_create(ip, owner)
  639.     main_control_ctrlwin_objects    *ip;
  640.     Xv_opaque    owner;
  641. {
  642.     Xv_opaque    obj;
  643.     
  644.     obj = xv_create(owner, PANEL_MESSAGE,
  645.         XV_KEY_DATA, INSTANCE, ip,
  646.         XV_X, 8,
  647.         XV_Y, 21,
  648.         PANEL_LABEL_STRING, "2",
  649.         PANEL_LABEL_BOLD, FALSE,
  650.         NULL);
  651.     return obj;
  652. }
  653.  
  654. /*
  655.  * Create object `statmsg3' in the specified instance.
  656.  */
  657. Xv_opaque
  658. main_control_ctrlwin_statmsg3_create(ip, owner)
  659.     main_control_ctrlwin_objects    *ip;
  660.     Xv_opaque    owner;
  661. {
  662.     Xv_opaque    obj;
  663.     
  664.     obj = xv_create(owner, PANEL_MESSAGE,
  665.         XV_KEY_DATA, INSTANCE, ip,
  666.         XV_X, 8,
  667.         XV_Y, 38,
  668.         PANEL_LABEL_STRING, "3",
  669.         PANEL_LABEL_BOLD, FALSE,
  670.         NULL);
  671.     return obj;
  672. }
  673.  
  674. /*
  675.  * Create object `statmsg4' in the specified instance.
  676.  */
  677. Xv_opaque
  678. main_control_ctrlwin_statmsg4_create(ip, owner)
  679.     main_control_ctrlwin_objects    *ip;
  680.     Xv_opaque    owner;
  681. {
  682.     Xv_opaque    obj;
  683.     
  684.     obj = xv_create(owner, PANEL_MESSAGE,
  685.         XV_KEY_DATA, INSTANCE, ip,
  686.         XV_X, 8,
  687.         XV_Y, 55,
  688.         PANEL_LABEL_STRING, "4",
  689.         PANEL_LABEL_BOLD, FALSE,
  690.         NULL);
  691.     return obj;
  692. }
  693.  
  694. /*
  695.  * Create object `controls3' in the specified instance.
  696.  */
  697. Xv_opaque
  698. main_control_ctrlwin_controls3_create(ip, owner)
  699.     main_control_ctrlwin_objects    *ip;
  700.     Xv_opaque    owner;
  701. {
  702.     Xv_opaque    obj;
  703.     
  704.     obj = xv_create(owner, PANEL,
  705.         XV_KEY_DATA, INSTANCE, ip,
  706.         XV_X, 0,
  707.         XV_Y, (int)xv_get(ip->controls2, XV_Y) +
  708.               (int)xv_get(ip->controls2, XV_HEIGHT) + 2,
  709.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  710.         XV_HEIGHT, 64,
  711.         WIN_BORDER, TRUE,
  712.         NULL);
  713.     return obj;
  714. }
  715.  
  716. /*
  717.  * Create object `edit_mode' in the specified instance.
  718.  */
  719. Xv_opaque
  720. main_control_ctrlwin_edit_mode_create(ip, owner)
  721.     main_control_ctrlwin_objects    *ip;
  722.     Xv_opaque    owner;
  723. {
  724.     extern void        edit_region_proc();
  725.     Xv_opaque    obj;
  726.     
  727.     obj = xv_create(owner, PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT,
  728.         XV_KEY_DATA, INSTANCE, ip,
  729.         XV_HELP_DATA, "main_control:edit_mode",
  730.         XV_X, 88,
  731.         XV_Y, 6,
  732.         PANEL_CHOICE_NROWS, 1,
  733.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  734.         PANEL_LABEL_STRING, "Edit:",
  735.         PANEL_NOTIFY_PROC, edit_region_proc,
  736.         PANEL_CHOICE_STRINGS,
  737.             "Off",
  738.             "modify",
  739.             "delete",
  740.             "copy",
  741.             "frame copy",
  742.             "hide",
  743.             NULL,
  744.         NULL);
  745.     return obj;
  746. }
  747.  
  748. /*
  749.  * Create object `edit_ok' in the specified instance.
  750.  */
  751. Xv_opaque
  752. main_control_ctrlwin_edit_ok_create(ip, owner)
  753.     main_control_ctrlwin_objects    *ip;
  754.     Xv_opaque    owner;
  755. {
  756.     extern void        do_edit_proc();
  757.     Xv_opaque    obj;
  758.     
  759.     obj = xv_create(owner, PANEL_BUTTON,
  760.         XV_KEY_DATA, INSTANCE, ip,
  761.         XV_X, 256,
  762.         XV_Y, 8,
  763.         PANEL_LABEL_STRING, "OK",
  764.         PANEL_NOTIFY_PROC, do_edit_proc,
  765.         NULL);
  766.     return obj;
  767. }
  768.  
  769. /*
  770.  * Create object `message7' in the specified instance.
  771.  */
  772. Xv_opaque
  773. main_control_ctrlwin_message7_create(ip, owner)
  774.     main_control_ctrlwin_objects    *ip;
  775.     Xv_opaque    owner;
  776. {
  777.     Xv_opaque    obj;
  778.     
  779.     obj = xv_create(owner, PANEL_MESSAGE,
  780.         XV_KEY_DATA, INSTANCE, ip,
  781.         XV_X, 8,
  782.         XV_Y, 11,
  783.         PANEL_LABEL_STRING, "Log Edit:",
  784.         PANEL_LABEL_BOLD, TRUE,
  785.         NULL);
  786.     return obj;
  787. }
  788.  
  789. /*
  790.  * Create object `edit_log_num' in the specified instance.
  791.  */
  792. Xv_opaque
  793. main_control_ctrlwin_edit_log_num_create(ip, owner)
  794.     main_control_ctrlwin_objects    *ip;
  795.     Xv_opaque    owner;
  796. {
  797.     extern void        edit_log_num_proc();
  798.     Xv_opaque    obj;
  799.     
  800.     obj = xv_create(owner, PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT,
  801.         XV_KEY_DATA, INSTANCE, ip,
  802.         XV_X, 8,
  803.         XV_Y, 32,
  804.         PANEL_CHOICE_NROWS, 1,
  805.         PANEL_LAYOUT, PANEL_HORIZONTAL,
  806.         PANEL_LABEL_STRING, "Log #:",
  807.         PANEL_NOTIFY_PROC, edit_log_num_proc,
  808.         PANEL_CHOICE_STRINGS,
  809.             "1",
  810.             "2",
  811.             "3",
  812.             "4",
  813.             NULL,
  814.         NULL);
  815.     return obj;
  816. }
  817.  
  818. /*
  819.  * Create object `button1' in the specified instance.
  820.  */
  821. Xv_opaque
  822. main_control_ctrlwin_button1_create(ip, owner)
  823.     main_control_ctrlwin_objects    *ip;
  824.     Xv_opaque    owner;
  825. {
  826.     extern void        renumber_logged_objects();
  827.     Xv_opaque    obj;
  828.     
  829.     obj = xv_create(owner, PANEL_BUTTON,
  830.         XV_KEY_DATA, INSTANCE, ip,
  831.         XV_X, 248,
  832.         XV_Y, 34,
  833.         PANEL_LABEL_STRING, "Renumber",
  834.         PANEL_NOTIFY_PROC, renumber_logged_objects,
  835.         NULL);
  836.     return obj;
  837. }
  838.  
  839. /*
  840.  * Create object `message9' in the specified instance.
  841.  */
  842. Xv_opaque
  843. main_control_ctrlwin_message9_create(ip, owner)
  844.     main_control_ctrlwin_objects    *ip;
  845.     Xv_opaque    owner;
  846. {
  847.     Xv_opaque    obj;
  848.     
  849.     obj = xv_create(owner, PANEL_MESSAGE,
  850.         XV_KEY_DATA, INSTANCE, ip,
  851.         XV_X, 119,
  852.         XV_Y, 37,
  853.         PANEL_LABEL_STRING, "Angle Measure",
  854.         PANEL_LABEL_BOLD, TRUE,
  855.         NULL);
  856.     return obj;
  857. }
  858.  
  859. /*
  860.  * Create object `controls4' in the specified instance.
  861.  */
  862. Xv_opaque
  863. main_control_ctrlwin_controls4_create(ip, owner)
  864.     main_control_ctrlwin_objects    *ip;
  865.     Xv_opaque    owner;
  866. {
  867.     Xv_opaque    obj;
  868.     
  869.     obj = xv_create(owner, PANEL,
  870.         XV_KEY_DATA, INSTANCE, ip,
  871.         XV_X, 0,
  872.         XV_Y, (int)xv_get(ip->controls3, XV_Y) +
  873.               (int)xv_get(ip->controls3, XV_HEIGHT) + 2,
  874.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  875.         XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  876.         WIN_BORDER, TRUE,
  877.         NULL);
  878.     return obj;
  879. }
  880.  
  881. /*
  882.  * Create object `infomesg' in the specified instance.
  883.  */
  884. Xv_opaque
  885. main_control_ctrlwin_infomesg_create(ip, owner)
  886.     main_control_ctrlwin_objects    *ip;
  887.     Xv_opaque    owner;
  888. {
  889.     Xv_opaque    obj;
  890.     
  891.     obj = xv_create(owner, PANEL_MESSAGE,
  892.         XV_KEY_DATA, INSTANCE, ip,
  893.         XV_X, 8,
  894.         XV_Y, 8,
  895.         PANEL_LABEL_STRING, "1",
  896.         PANEL_LABEL_BOLD, FALSE,
  897.         NULL);
  898.     return obj;
  899. }
  900.  
  901. /*
  902.  * Create object `message3' in the specified instance.
  903.  */
  904. Xv_opaque
  905. main_control_ctrlwin_message3_create(ip, owner)
  906.     main_control_ctrlwin_objects    *ip;
  907.     Xv_opaque    owner;
  908. {
  909.     Xv_opaque    obj;
  910.     
  911.     obj = xv_create(owner, PANEL_MESSAGE,
  912.         XV_KEY_DATA, INSTANCE, ip,
  913.         XV_X, 8,
  914.         XV_Y, 24,
  915.         PANEL_LABEL_STRING, "X:",
  916.         PANEL_LABEL_BOLD, TRUE,
  917.         NULL);
  918.     return obj;
  919. }
  920.  
  921. /*
  922.  * Create object `xlabel' in the specified instance.
  923.  */
  924. Xv_opaque
  925. main_control_ctrlwin_xlabel_create(ip, owner)
  926.     main_control_ctrlwin_objects    *ip;
  927.     Xv_opaque    owner;
  928. {
  929.     Xv_opaque    obj;
  930.     
  931.     obj = xv_create(owner, PANEL_MESSAGE,
  932.         XV_KEY_DATA, INSTANCE, ip,
  933.         XV_X, 32,
  934.         XV_Y, 24,
  935.         PANEL_LABEL_STRING, "0",
  936.         PANEL_LABEL_BOLD, FALSE,
  937.         NULL);
  938.     return obj;
  939. }
  940.  
  941. /*
  942.  * Create object `message4' in the specified instance.
  943.  */
  944. Xv_opaque
  945. main_control_ctrlwin_message4_create(ip, owner)
  946.     main_control_ctrlwin_objects    *ip;
  947.     Xv_opaque    owner;
  948. {
  949.     Xv_opaque    obj;
  950.     
  951.     obj = xv_create(owner, PANEL_MESSAGE,
  952.         XV_KEY_DATA, INSTANCE, ip,
  953.         XV_X, 88,
  954.         XV_Y, 24,
  955.         PANEL_LABEL_STRING, "Y:",
  956.         PANEL_LABEL_BOLD, TRUE,
  957.         NULL);
  958.     return obj;
  959. }
  960.  
  961. /*
  962.  * Create object `ylabel' in the specified instance.
  963.  */
  964. Xv_opaque
  965. main_control_ctrlwin_ylabel_create(ip, owner)
  966.     main_control_ctrlwin_objects    *ip;
  967.     Xv_opaque    owner;
  968. {
  969.     Xv_opaque    obj;
  970.     
  971.     obj = xv_create(owner, PANEL_MESSAGE,
  972.         XV_KEY_DATA, INSTANCE, ip,
  973.         XV_X, 112,
  974.         XV_Y, 24,
  975.         PANEL_LABEL_STRING, "0",
  976.         PANEL_LABEL_BOLD, FALSE,
  977.         NULL);
  978.     return obj;
  979. }
  980.  
  981. /*
  982.  * Create object `message5' in the specified instance.
  983.  */
  984. Xv_opaque
  985. main_control_ctrlwin_message5_create(ip, owner)
  986.     main_control_ctrlwin_objects    *ip;
  987.     Xv_opaque    owner;
  988. {
  989.     Xv_opaque    obj;
  990.     
  991.     obj = xv_create(owner, PANEL_MESSAGE,
  992.         XV_KEY_DATA, INSTANCE, ip,
  993.         XV_X, 200,
  994.         XV_Y, 24,
  995.         PANEL_LABEL_STRING, "Gray:",
  996.         PANEL_LABEL_BOLD, TRUE,
  997.         NULL);
  998.     return obj;
  999. }
  1000.  
  1001. /*
  1002.  * Create object `glabel' in the specified instance.
  1003.  */
  1004. Xv_opaque
  1005. main_control_ctrlwin_glabel_create(ip, owner)
  1006.     main_control_ctrlwin_objects    *ip;
  1007.     Xv_opaque    owner;
  1008. {
  1009.     Xv_opaque    obj;
  1010.     
  1011.     obj = xv_create(owner, PANEL_MESSAGE,
  1012.         XV_KEY_DATA, INSTANCE, ip,
  1013.         XV_X, 240,
  1014.         XV_Y, 24,
  1015.         PANEL_LABEL_STRING, "0",
  1016.         PANEL_LABEL_BOLD, FALSE,
  1017.         NULL);
  1018.     return obj;
  1019. }
  1020.  
  1021. /*
  1022.  * Create object `imglabel' in the specified instance.
  1023.  */
  1024. Xv_opaque
  1025. main_control_ctrlwin_imglabel_create(ip, owner)
  1026.     main_control_ctrlwin_objects    *ip;
  1027.     Xv_opaque    owner;
  1028. {
  1029.     Xv_opaque    obj;
  1030.     
  1031.     obj = xv_create(owner, PANEL_MESSAGE,
  1032.         XV_KEY_DATA, INSTANCE, ip,
  1033.         XV_X, 8,
  1034.         XV_Y, 40,
  1035.         PANEL_LABEL_STRING, "0x0, [0:255], byte",
  1036.         PANEL_LABEL_BOLD, FALSE,
  1037.         NULL);
  1038.     return obj;
  1039. }
  1040.  
  1041. /*
  1042.  * Initialize an instance of object `imgwin'.
  1043.  */
  1044. main_control_imgwin_objects *
  1045. main_control_imgwin_objects_initialize(ip, owner)
  1046.     main_control_imgwin_objects    *ip;
  1047.     Xv_opaque    owner;
  1048. {
  1049.     if (!ip && !(ip = (main_control_imgwin_objects *) calloc(1, sizeof (main_control_imgwin_objects))))
  1050.         return (main_control_imgwin_objects *) NULL;
  1051.     if (!ip->imgwin)
  1052.         ip->imgwin = main_control_imgwin_imgwin_create(ip, owner);
  1053.     if (!ip->imgcanv)
  1054.         ip->imgcanv = main_control_imgwin_imgcanv_create(ip, ip->imgwin);
  1055.     return ip;
  1056. }
  1057.  
  1058. /*
  1059.  * Create object `imgwin' in the specified instance.
  1060.  */
  1061. Xv_opaque
  1062. main_control_imgwin_imgwin_create(ip, owner)
  1063.     main_control_imgwin_objects    *ip;
  1064.     Xv_opaque    owner;
  1065. {
  1066.     extern Notify_value    main_control_imgwin_event_callback();
  1067.     Xv_opaque    obj;
  1068.     
  1069.     obj = xv_create(owner, FRAME,
  1070.         XV_KEY_DATA, INSTANCE, ip,
  1071.         XV_WIDTH, 450,
  1072.         XV_HEIGHT, 369,
  1073.         XV_LABEL, "GENIAL Image",
  1074.         XV_SHOW, FALSE,
  1075.         FRAME_SHOW_FOOTER, FALSE,
  1076.         FRAME_SHOW_RESIZE_CORNER, TRUE,
  1077.         NULL);
  1078.     xv_set(obj, WIN_CONSUME_EVENTS,
  1079.         NULL, NULL);
  1080.     notify_interpose_event_func(obj,
  1081.         (Notify_func) main_control_imgwin_event_callback, NOTIFY_SAFE);
  1082.     return obj;
  1083. }
  1084.  
  1085. /*
  1086.  * Create object `imgcanv' in the specified instance.
  1087.  */
  1088. Xv_opaque
  1089. main_control_imgwin_imgcanv_create(ip, owner)
  1090.     main_control_imgwin_objects    *ip;
  1091.     Xv_opaque    owner;
  1092. {
  1093.     extern Notify_value    imgwin_event_proc();
  1094.     extern void    imgwin_repaint_proc();
  1095.     Xv_opaque    obj;
  1096.     
  1097.     obj = xv_create(owner, CANVAS,
  1098.         XV_KEY_DATA, INSTANCE, ip,
  1099.         XV_X, 0,
  1100.         XV_Y, 0,
  1101.         XV_WIDTH, WIN_EXTEND_TO_EDGE,
  1102.         XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  1103.         CANVAS_REPAINT_PROC, imgwin_repaint_proc,
  1104.         CANVAS_X_PAINT_WINDOW, TRUE,
  1105.         NULL);
  1106.     xv_create(obj, SCROLLBAR, SCROLLBAR_DIRECTION, SCROLLBAR_HORIZONTAL, NULL);
  1107.     xv_create(obj, SCROLLBAR, SCROLLBAR_DIRECTION, SCROLLBAR_VERTICAL, NULL);
  1108.     xv_set(canvas_paint_window(obj), WIN_CONSUME_EVENTS,
  1109.         WIN_MOUSE_BUTTONS,
  1110.         LOC_MOVE,
  1111.         LOC_DRAG,
  1112.         LOC_WINENTER,
  1113.         LOC_WINEXIT,
  1114.         WIN_ASCII_EVENTS,
  1115.         WIN_LEFT_KEYS,
  1116.         WIN_RIGHT_KEYS,
  1117.         WIN_TOP_KEYS,
  1118.         NULL, NULL);
  1119.     notify_interpose_event_func(canvas_paint_window(obj),
  1120.         (Notify_func) imgwin_event_proc, NOTIFY_SAFE);
  1121.     /*
  1122.      * This line is here for backwards compatibility. It will be
  1123.      * removed for the next release.
  1124.      */
  1125.     xv_set(canvas_paint_window(obj), XV_KEY_DATA, INSTANCE, ip, NULL);
  1126.     return obj;
  1127. }
  1128.  
  1129.